<?php
/**
 * Created by PhpStorm.
 * User: Lin Hui
 * Date: 2017/5/25
 * Time: 15:51
 */

namespace Home\Controller;


use Common\Model\ArticleModel;
use Common\Model\SettingModel;

class AboutController extends BaseController
{
    public $pageTheme = "<ul class='pageList'><li>%UP_PAGE%</li>%LINK_PAGE%<li>%DOWN_PAGE%</li></ul>";
    /**
     * 公司介绍
     */
    public function company()
    {
        $model = new SettingModel();
        $this->assign('info', $model->getPageInfo(ACTION_NAME));
        $this->display();
    }

    /**
     *发展历程
     */
    public function development()
    {
        $model = new SettingModel();
        $this->assign('info', $model->getPageInfo(ACTION_NAME));
        $this->display();
    }
    /**
     *创始人介绍
     */
    public function founder()
    {
        $model = new SettingModel();
        $this->assign('info', $model->getPageInfo(ACTION_NAME));
        $this->display();
    }


    /**
     * 公司风采
     */
    public function elegant()
    {
        $category = C('ARTICLE.category');
        list($list, $page) = (new ArticleModel())->getArticleByCategory($category['elegant'], 9);
        $page->rollPage = 5;
        $page->setConfig('theme',$this->pageTheme);
        $page->setConfig('prev', '上一页');
        $page->setConfig('next', '下一页');
        $this->assign('page', $page->show());
        $this->assign('list', $list);
        $this->display();
    }
}